#ifndef PTREEITEM_H
#define PTREEITEM_H

#include <QList>
#include <QVariant>
#include <QVector>

class PTreeItem
{
public:
    PTreeItem( const QVector<QVariant> &data,
                             PTreeItem *parent = 0
            );
    ~PTreeItem();

          int      childCount ( void )       const;
          int     columnCount ( void )       const;
     QVariant            data ( int column ) const;
          int     childNumber ( void )       const;

    PTreeItem         *parent ( void );
    PTreeItem          *child ( int number ) ;

         bool  insertChildren ( int position, int count, int columns );
         bool   insertColumns ( int position, int columns );
         bool  removeChildren ( int position, int count );
         bool   removeColumns ( int position, int columns );
         bool         setData ( int column, const QVariant &value );

private:
    QList<PTreeItem*> childItems;
    QVector<QVariant> itemData;
    PTreeItem *parentItem;
};

#endif // PTREEITEM_H
